import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:simudata_display/app/modules/home/controllers/home_controller.dart';
import 'package:simudata_display/app/modules/home/views/home_view.dart';
import 'package:simudata_display/app/services/influx_db_client_service.dart';
import 'package:simudata_display/app/services/mqtt_client_service.dart';
import 'package:simudata_display/generated/locales.g.dart';
import 'package:window_manager/window_manager.dart';

import 'app/routes/app_pages.dart';

void main() async {
  Get.put(MqttClientService());
  Get.put(InfluxDBClientService());
  Get.put(HomeController());

  // await WindowManager.instance.ensureInitialized();
  // windowManager.waitUntilReadyToShow().then((_) async {
  //   await windowManager.setTitleBarStyle(
  //     TitleBarStyle.hidden,
  //     windowButtonVisibility: false,
  //   );
  //   await windowManager.setMinimumSize(const Size(500, 600));
  //   await windowManager.show();
  //   await windowManager.setPreventClose(true);
  //   await windowManager.setSkipTaskbar(false);
  // });
  runApp(
    GetMaterialApp(
      translationsKeys: AppTranslation.translations,
      initialRoute: AppPages.INITIAL,
      getPages: AppPages.routes,
      // home: const FluentApp(
      //   home: HomeView(),
      // ),
    ),
  );
}
